<?php

use Biz\model\SamsungActivity\SamsungJoinUserListModel;
use Doraemon\service\User;

class MaterialsAction extends ActionPlugin
{
    const USER_LEVEL = self::LEVEL_NOTHING;

    /**
     * @throws \Exception
     */
    public function main()
    {
        $currUid = $this->uid;
        $data['artist'] = SamsungJoinUserListModel::ARTIST_MAP;
        $data['profession'] = SamsungJoinUserListModel::PROFESSION_MAP;
        $data['tv_type'] = SamsungJoinUserListModel::TV_TYPE_MAP;
        if ($currUid > 0) {
            $userinfo = User::getBasicUserInfosByCache([$currUid]);
            $data['user_info'] = $userinfo[$currUid] ?? [];
        } else {
            $data['user_info'] = [];
        }

        $this->setSuccess($data, self::API_CODE_SUCCES);

    }
}